from websocket import create_connection
import json

a=create_connection('ws://127.0.0.1:7777')
b=create_connection('ws://127.0.0.1:7779')
i=0
while i<10:
    data_b=b.recv()
    print(data_b)
    data_str=a.recv()
    data=json.loads(data_str)
    print(data)
    i+=1

# 单一客户端与多服务端的情况，是阻塞的情况